-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Adds feature metrics for collection prefs and button group #3180
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3180 +/- ##
========================================
Coverage 96.40% 96.41%
========================================
Files 784 784
Lines 22144 22155 +11
Branches 7191 7538 +347
========================================
+ Hits 21349 21360 +11
+ Misses 788 743 -45
- Partials 7 52 +45 ☔ View full report in Codecov by Sentry. |
expect(useBaseComponent).toHaveBeenCalledWith('ButtonGroup', { | ||
props: { | ||
variant: 'icon', | ||
dropdownExpandToViewport: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be false instead? Not sure how the metrics handle undefined values here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics use JSON.stringify
. When you serialise undefined, it disappears completely, same as this key did not exist before.
Explicit casting is recommended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was thinking about that too, but decided not touch it just yet. I think it would be nice to align within the team if we want to cast or not and how do we want to treat properties that have defaults: should we pass the default value or the missing one, as it directly affects the actual metrics we gather.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all other cases, we track resolved values after defaulting.
For dropdownExpandToViewport
there is an implicit default false
which we should be tracking.
Description
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.